package kitchen.beans;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * FoodFoodTypesRelation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "food_food_types_relation", catalog = "delicacy")
public class FoodFoodTypesRelation implements java.io.Serializable {

	// Fields

	private Integer id;
	private FoodTypes foodTypes;
	private Food food;

	// Constructors

	/** default constructor */
	public FoodFoodTypesRelation() {
	}

	/** full constructor */
	public FoodFoodTypesRelation(Integer id, FoodTypes foodTypes, Food food) {
		this.id = id;
		this.foodTypes = foodTypes;
		this.food = food;
	}

	// Property accessors
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "food_type_id", nullable = false)
	public FoodTypes getFoodTypes() {
		return this.foodTypes;
	}

	public void setFoodTypes(FoodTypes foodTypes) {
		this.foodTypes = foodTypes;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "food_id", nullable = false)
	public Food getFood() {
		return this.food;
	}

	public void setFood(Food food) {
		this.food = food;
	}

}